home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et3_0-a1.lha
/
et3
/
src
/
Progress.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-27
|
931b
|
55 lines
#ifndef Progress_First
#ifdef __GNUG__
//pragma once
#pragma interface
#endif
#define Progress_First
#include "Object.h"
//---- Progress ----------------------------------------------------------------
class Progress : public Object {
public:
MetaDef(Progress);
Progress();
inline void SetMax(int mx);
inline bool Tick(int curr);
inline bool Inc(int inc);
void Start(char *message, int mx);
void Stop();
void Abort();
virtual void SetMessage(char *message);
protected:
virtual void SetUp();
virtual bool SetVal();
virtual void Abort(bool skiptoend);
int curr, max;
bool timeout;
};
extern Progress *gProgress;
inline void Progress::SetMax(int mx)
{
max= mx;
}
inline bool Progress::Tick(int val)
{
curr= val;
return timeout ? SetVal() : FALSE;
}
inline bool Progress::Inc(int inc)
{
curr+= inc;
return timeout ? SetVal() : FALSE;
}
#endif